<template>
	<view class="content">
		<view class="header">
			<view class="top">
				<u-icon class="u-icon" name="arrow-left" color="#fff" size="16" @click="goBack"></u-icon>
				<p>订单详情</p>
				<span></span>
			</view>
			<view class="tops">
				<dl>
					<dt><u-icon name="checkmark-circle" color="#fff" size="26"></u-icon></dt>
					<dd>
						<p class="p">{{dataList[detail].state}}</p>
						<p class="p1">请您持购票证件在车站或代售点取票后按时乘车</p>
					</dd>
				</dl>
			</view>
		</view>
		<view class="main">
			<p>取票号 : {{dataList[detail].Auftragsnummer}}</p>
			<view class="maina">
				<span>{{dataList[detail].Departures}}周二</span>
				<span>{{dataList[detail].ArrivalData}}周二</span>
			</view>
			<view class="mainb">
				<span>{{dataList[detail].DeparTime}}</span>
				<span>经停信息</span>
				<span>{{dataList[detail].ArrivalTime}}</span>
			</view>
			<view class="mainc">
				<view class="maincone">
					<span>{{dataList[detail].DeparPlace}}</span>
					<u-icon class="u-icon" name="map-fill" color="#000" size="14"></u-icon>
				</view>
				<span>{{dataList[detail].trainNum}}</span>
				<view class="mainctwo">
					<u-icon class="u-icon" name="map-fill" color="#000" size="14"></u-icon>
					<span>{{dataList[detail].ArrivalPlace}}</span>
				</view>
			</view>
			<view class="maind">
				<view class="maindone">
					<view class="maindones">
						<span>{{dataList[detail].booker}}</span>
						<span>成人票</span>
					</view>
					<span class="sp">一等座￥{{dataList[detail].priceMsg}}</span>
				</view>
				<view class="maindtwo">
					<span>身份证 110102**********28</span>
					<view class="maindtwos">
						<span>靠窗</span>
						<span>{{dataList[detail].carriag}}车厢{{dataList[detail].seatNumber}}号</span>
					</view>
				</view>
				<view class="mainthird">
					<span>{{dataList[detail].state}}</span>
				</view>
			</view>
		</view>
		<view class="foot">
			<view class="footone">
				<view class="footonea">
					<p>订单号</p>
					<p>{{dataList[detail].orderNum}}</p>
				</view>
				<view class="footoneb">
					<p>通知手机</p>
					<p>{{dataList[detail].telephoneNum}}</p>
				</view>
			</view>
			<view class="foottow">
				<view class="foottowa">
					<p>成人票</p>
					<p>￥{{dataList[detail].priceMsg}}x1张</p>
				</view>
				<view class="foottowb">
					<p>订单总计</p>
					<p class="foottowbp">￥{{dataList[detail].priceMsg}}</p>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	let list2 = require('../Order/orderList.json')
	export default {
		data() {
			return {
				dataList: '',
				detail: 0
			}
		},
		onLoad(options) {
			const id = options.id - 1;
			this.detail = id;

			console.log(this.detail)
		},
		methods: {
			goBack() {
				uni.navigateBack()
			}
		},
		mounted() {
			this.dataList = list2
			console.log(this.dataList)
		}
	}
</script>

<style lang="scss">
	.content {
		width: 100vw;
		height: 100vh;
		background-color: rgb(239, 239, 239);
	}

	.header {
		width: 100vw;
		height: 38vh;
		background-color: #00acbd;
		border-bottom-right-radius: 40rpx;
		border-bottom-left-radius: 40rpx;

		.top {
			width: 100%;
			height: 80rpx;
			padding-top: 80rpx;
			display: flex;
			align-items: center;

			.u-icon {
				margin-left: 20rpx;
			}

			p {
				margin-left: 245rpx;

				color: #fff;
				font-size: 35rpx;
			}
		}

		.tops {
			width: 90%;
			height: 140rpx;
			margin: 0 auto;
			margin-top: 15rpx;

			dt {
				margin-top: 50rpx;
			}

			dl {
				width: 100%;
				height: 100%;
				display: flex;
				justify-content: space-between;

				dd {
					width: 85%;
					height: 100%;

					.p {
						color: #fff;
						font-size: 45rpx;
						margin-top: 25rpx;
					}

					.p1 {
						font-size: 25rpx;
						color: #fff;
						margin-top: 20rpx;
					}
				}
			}
		}
	}

	.main {
		width: 96vw;
		height: 39vh;
		background-color: #fff;
		margin-left: 2vw;
		border-radius: 20rpx;
		margin-top: -180rpx;

		p {
			font-size: 25rpx;
			padding: 40rpx;
		}

		.maina {
			width: 90%;
			height: 40rpx;
			margin: 0 auto;
			display: flex;
			justify-content: space-between;
			margin-top: -20rpx;

			span:nth-child(1) {
				font-size: 20rpx;
				color: #4d4d4d;
			}

			span:nth-child(2) {
				font-size: 20rpx;
				color: #4d4d4d;
			}
		}

		.mainb {
			width: 90%;
			height: 70rpx;
			margin: 0 auto;
			display: flex;
			justify-content: space-between;
			align-items: center;

			span:nth-child(1) {
				font-weight: 800;
				font-size: 45rpx;
			}

			span:nth-child(3) {
				font-weight: 800;
				font-size: 45rpx;
			}

			span:nth-child(2) {
				display: inline-block;
				padding: 10rpx;
				width: 120rpx;
				height: 40rpx;
				border: 2rpx solid #ccc;
				border-radius: 40rpx;
				font-size: 22rpx;
				text-align: center;
				line-height: 40rpx;
			}
		}

		.mainc {
			width: 90%;
			height: 70rpx;
			margin: 0 auto;
			display: flex;
			align-items: center;
			justify-content: space-between;

			span {
				font-size: 32rpx;
			}

			.maincone,
			.mainctwo {
				display: flex;
				justify-content: space-between;
				align-items: center;
				width: 130rpx;
				height: 100%;
			}
		}

		.maind {
			width: 90%;
			height: 220rpx;
			background: #f5f5f5;
			border-radius: 20rpx;
			margin: 0 auto;
			margin-top: 10rpx;

			.maindone {
				.sp {
					font-size: 32rpx;
					margin-right: -100rpx;
				}

				width: 100%;
				height: 90rpx;
				align-items: center;
				display: flex;
				justify-content: space-around;

				.maindones {
					display: flex;
					align-items: center;
					margin-left: -100rpx;

					span:nth-child(1) {
						font-weight: 800;
						font-size: 32rpx;
					}

					span:nth-child(2) {
						border-radius: 10rpx;
						border: 2rpx solid #d2d2d2;
						text-align: center;
						display: inline-block;
						font-size: 26rpx;
						width: 90rpx;
						height: 40rpx;
						margin-left: 15rpx;
						color: #d2d2d2;
					}
				}

			}

			.maindtwo {
				display: flex;
				justify-content: space-around;
				align-items: center;
				width: 100%;
				height: 50rpx;

				span:nth-child(1) {
					font-size: 28rpx;
					color: #ccc;
				}

				.maindtwos {
					width: 260rpx;
					height: 50rpx;
					display: flex;
					justify-content: space-around;
					align-items: center;

					span:nth-child(1) {
						font-size: 24rpx;
						display: inline-block;
						width: 60rpx;
						height: 30rpx;
						text-align: center;
						border: 2rpx solid #33c075;
						color: #33c075;
					}

					span:nth-child(2) {
						font-size: 30rpx;
					}
				}
			}

			.mainthird {
				span {
					color: #33c075;
					font-size: 24rpx;
					margin-left: 18rpx;
				}
			}
		}
	}

	.foot {
		width: 96vw;
		height: 440rpx;
		margin: 0 auto;
		margin-top: 20rpx;

		.footone {
			width: 100%;
			height: 210rpx;
			background: #fff;
			border-radius: 20rpx;

			.footonea {
				width: 90%;
				height: 105rpx;
				margin: 0 auto;
				display: flex;
				align-items: center;
				border-bottom: 2rpx solid #ccc;
				font-size: 30rpx;
				justify-content: space-between;
			}

			.footoneb {
				width: 90%;
				height: 105rpx;
				margin: 0 auto;
				display: flex;
				align-items: center;
				font-size: 30rpx;
				justify-content: space-between;
			}
		}

		.foottow {
			width: 100%;
			height: 210rpx;
			background: #fff;
			margin-top: 20rpx;
			border-radius: 20rpx;

			.foottowa {
				width: 90%;
				height: 105rpx;
				margin: 0 auto;
				display: flex;
				align-items: center;
				border-bottom: 2rpx solid #ccc;
				font-size: 30rpx;
				justify-content: space-between;
			}

			.foottowb {
				width: 90%;
				height: 105rpx;
				margin: 0 auto;
				display: flex;
				align-items: center;
				font-size: 30rpx;
				justify-content: space-between;

				.foottowbp {
					color: #ff7a00;
					font-weight: 800;
					font-size: 34rpx;
				}

			}
		}
	}
</style>